Skip to content

[18.0][MIG] hr_job_category: Migration to 18.0 #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: 18.0
Choose a base branch
from

Conversation

BhaveshHeliconia
Copy link

No description provided.

@BhaveshHeliconia BhaveshHeliconia mentioned this pull request Dec 19, 2024
19 tasks
Iryna Vyshnevska and others added 13 commits February 25, 2025 10:59
[UPD] Update hr_job_category.pot

[UPD] README.rst

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (4 of 4 strings)

Translation: hr-14.0/hr-14.0-hr_job_category
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_job_category/pt_BR/

Translated using Weblate (German)

Currently translated at 100.0% (4 of 4 strings)

Translation: hr-14.0/hr-14.0-hr_job_category
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_job_category/de/

[UPD] Update hr_job_category.pot

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: hr-14.0/hr-14.0-hr_job_category
Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_job_category/
When updating the hr.contract we shouldn't remove
already existing tags
When you update the contract, you dont remove tags that are manually added
[BOT] post-merge updates
Currently translated at 100.0% (4 of 4 strings)

Translation: hr-17.0/hr-17.0-hr_job_category
Translate-URL: https://translation.odoo-community.org/projects/hr-17-0/hr-17-0-hr_job_category/it/
employee.write({"category_ids": tags_to_add})

@api.model_create_multi
def create(self, vals_list):
Copy link

@luisDIXMIT luisDIXMIT May 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the create method in version 18 receives a list of vals as a parameter, it must be iterated to validate each record. Therefore, the method must be written as follows, otherwise it won't work.

Suggested change
def create(self, vals_list):
def create(self, vals_list):
res = super().create(vals_list)
for vals in vals_list:
if "job_id" in vals:
res._tag_employees(vals.get("job_id"))
return res

@BhaveshHeliconia BhaveshHeliconia force-pushed the 18.0-mig-hr_job_category branch from 4bf96b3 to 65da7b4 Compare May 6, 2025 09:12
@BhaveshHeliconia
Copy link
Author

@luisDIXMIT, Please Review.it's done.

Copy link

@luisDIXMIT luisDIXMIT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, LGTM!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants